home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / system / dirco501.zip / DIRCOMP.DOC < prev    next >
Text File  |  1995-01-02  |  8KB  |  166 lines

  1. DIRCOMP.DOC
  2. 01/02/95
  3.  
  4. DIRCOMP compares two complete subdirectories and looks for dissimilarities
  5. between files (different sizes or creation dates as well as missing files).  It
  6. produces a disk report called (by default) C:\DIRCOMP.TXT showing the
  7. dissimilarities.  In some ways, this is similar to a separate utility called
  8. FILUPDAT but DIRCOMP adds a couple of features:
  9.  
  10.   * It can resolve the dissimilarities for you.  When you call the
  11.     routine, you provide a primary subdirectory and a secondary subdirectory.
  12.     If files in the primary subdirectory are more recent than those in the
  13.     secondary subdirectory, DIRCOMP can copy the files for you (similar to the
  14.     DOS REPLACE command with the /U option).
  15.   * In addition, if files exist in the secondary subdirectory that aren't in
  16.     the primary, DIRCOMP can kill the files in the secondary subdirectory for
  17.     you.
  18.   * Can produce a status file showing what was compared, resolved, etc.
  19.   * DIRCOMP can also go through child subdirectories for you and do this
  20.     effort throughout.
  21.   * DIRCOMP can move the files instead of copy them, effectively allowing you
  22.     to prune and graft directory structures.
  23.  
  24. To reduce the risks inherent in this sort of automatic execution, neither
  25. /UPDATE or /KILL are available if the secondary subdirectory is a network drive
  26. unless the "/NET" option is passed in.
  27.  
  28. DIRCOMP is typically used in the process of backing up files from one drive to
  29. another.  DIRCOMP allows you to easily copy every file and get rid of now
  30. non-existant files.
  31.  
  32. Note that DOS includes a command called REPLACE which will do some of the same
  33. things that this utility does.  The central differences are that REPLACE won't
  34. delete mismatched files and it doesn't produce a report on inconsistencies.
  35. REPLACE also doesn't have the ability to handle odd attributes or deal with
  36. cascading subdirectories.  REPLACE *is* a lot quicker though.
  37.  
  38.  
  39. Syntax:
  40.  
  41.     DIRCOMP directory1 directory2 [ /S ] [ /CREATE ]
  42.       [ /UPDATE ] [ /KILL ] [ /CLONE ] [ /MOVE ] [ /ATTR=[H][S][R] ] [ /NET ]
  43.       [ /Frptfile | /-F ] [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
  44.       [ /ALL ] [ /Td: | /Td:\path ] [ /Q ] [ /? ]
  45.  
  46. where:
  47.  
  48. "directory1" is the name of the primary (source) subdirectory.  If /UPDATE or
  49. /KILL are used, the secondary subdirectory's contents will be changed to reflect
  50. the ones here.
  51.  
  52. "directory2" is the name of the secondary subdirectory which will have files
  53. copied to it or deleted from it.
  54.  
  55.  
  56. "/S" goes through and processes subdirectories off of the subdirectories you
  57. specified in a cascading manner.  You can use this option to copy entire
  58. directory trees if you want.  Still requires /UPDATE and/or /KILL if you want it
  59. to actually do anything besides report on conditions of course.  The program may
  60. not be smart enough to delete all embedded subdirectories.
  61.  
  62. "/CREATE" will create directory2 if it doesn't exist already.
  63.  
  64. "/UPDATE" says to copy any files from directory1 to directory2 which are either
  65. (a) newer in directory1 or (b) not in directory2 at all.  Files will *NOT* be
  66. copied if (a) the directory2 files are more recent or (b) file sizes are the
  67. only difference.
  68.  
  69. "/KILL" says to delete any files in directory2 which are not in directory1.
  70. /KILL automatically invokes /UPDATE.
  71.  
  72. "/CLONE" says to copy all files from directory1 to directory2 even if if the
  73. files in directory2 are more recent than those in directory1.  /CLONE
  74. automatically invokes /UPDATE.
  75.  
  76. "/MOVE" says to move the files instead of copying them.  This deletes from
  77. directory1 any file that was copied to directory2.  (The deletion is done only
  78. if the initial copy succeeded.) Typically, the option is used in combination
  79. with the /CLONE option.
  80.  
  81. "/ATTR=[H][S][R]" allows you to specify a combination of attributes that you
  82. want considered.  Normally, hidden, system, and read-only files are ignored by
  83. the routine.  Using /ATTR, you can include whatever you want.  /ATTR=HSR, for
  84. example, gets them all.
  85.  
  86. "/NET" removes a restriction which does not allow the secondary directory to be
  87. a network drive.  Note that the test the program performs for this is somewhat
  88. imperfect and it may not notice that it's actually a networked drive.  Sorry!
  89.  
  90. "/Frptfile" provides the name of the report file to create.  "/FC:\DIRCOMP.TXT"
  91. is the default.  Specifying "/FSCRN:" will send the report to the screen.
  92.  
  93. "/-F" stops the creation of the report file.
  94.  
  95. "/OVERWRITE" says to overwrite the report file if it's already there.
  96.  
  97. "/APPEND" says to append to the end of any existing report file.
  98.  
  99. "/-OVERWRITE" says to abort if the output file exists already.
  100.  
  101. "/OVERASK" says to prompt if the output file exists already.  This is the
  102. default.
  103.  
  104. "/ALL" says to write all files to the report file (typically C:\DIRCOMP.TXT),
  105. not just the ones that have differences.
  106.  
  107.  
  108. "/Td:" specifies the drive to write any temporary ISAM files that the routine
  109. needs.  ISAM data bases are used to store and sort the file names.  ISAM files
  110. cannot be created reliably on certain types of drives.  If a /Td: specification
  111. (e.g.  "/TC:") is not specified, the routine checks each of the following drive
  112. specifications in order:
  113.   - the drive where the report is being written to (using the /Frptfile spec if
  114.     present)
  115.   - the default drive
  116.   - drive C
  117. In each case, the program tries to skip the drive if it's either removeable or
  118. a remote (network) drive.  The latter test is often incorrect.  After that, it
  119. tries to create a file on the drive; CD-ROM drives always fail that test.
  120.  
  121. "/Td:\path" is similar to "/Td:" but it allows you to fully specify the path for
  122. the temporary output files.  If you don't specify a "/T" parameter at all or if
  123. you use "/Td:", the files will always be written to the root directory.
  124.  
  125. "/Q" turns off the file-by-file status messages.
  126.  
  127. "/?" or "/HELP" or "HELP" gives you syntactical help for the command.
  128.  
  129. Samples:        DIRCOMP J:\EBBNEW\DATA E:\EBBNEW\DATA /KILL /FC:\DATA.EBB
  130.                 DIRCOMP E:\EBBNEW\DATA J:\EBBNEW\DATA /UPDATE /KILL /NET
  131.                 DIRCOMP C:\TC D:\TEMP /UPDATE /KILL /ATTR=RHS /S
  132.  
  133.  
  134. NOTE ON DISK SPACE:  By default, DIRCOMP builds ISAM files with intermediate
  135. results on your C drive.  If you specify an /Frptfile parameter and include a
  136. drive specification, it will typically create the ISAM files there instead.  You
  137. can also specify the ISAM location using the /Td: parameter.
  138.  
  139. Writer:
  140.  
  141. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  142. and redistribution provided relevant documentation is kept with the program, no
  143. changes are made to the program or documentation, and it is not bundled with
  144. commercial programs or charged for separately.  People who need to bundle it in
  145. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  146. following address.
  147.  
  148. Additional information about this and other Wayne Software programs can be found
  149. in the file BRUCEymm.DOC which should be included in the original ZIP file.
  150. ("ymm" is replaced by the last digit of the year and the two digit month of the
  151. release.  BRUCE312.DOC came out in December 1993.  This same naming convention
  152. is used in naming the ZIP file that this program was included in.) Comments and
  153. suggestions can also be sent to:
  154.  
  155.                 Bruce Guthrie
  156.                 Wayne Software
  157.                 113 Sheffield St.
  158.                 Silver Spring, MD 20910
  159.  
  160.                 fax: (301) 588-8986
  161.  
  162. See BRUCEymm.DOC file for additional contact information.
  163.  
  164. Foreign users:  Please provide an Internet e-mail address in all correspondence.
  165.  
  166.